package com.karry.yl.service.personnel.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.karry.commons.base.impl.SuperServiceImpl;
import com.karry.yl.dao.personnel.DepartmentMapper;
import com.karry.yl.domain.personnel.Department;
import com.karry.yl.domain.personnel.DepartmentTreeTemplate;
import com.karry.yl.service.personnel.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;


/**
 * @author Administrator
 */
@Service
public class DepartmentServiceImpl extends SuperServiceImpl<DepartmentMapper, Department> implements DepartmentService {

    @Autowired
    DepartmentMapper departmentMapper;
    @Override
    public List<DepartmentTreeTemplate> getTree(Long orgId) {
        //创建一个容器存储树状结构的部门
        List<DepartmentTreeTemplate> departmentsTree = departmentMapper.getTree(orgId);
        return departmentsTree;
    }
}
